package com.kedacom.freedomLabel.model.bean;

import android.text.TextUtils;

import com.google.gson.Gson;

import java.io.Serializable;

public class SharedFile implements Serializable {
    private String Path;
    private String name;

    public SharedFile() {
    }

    public SharedFile(String path, String name) {
        Path = path;
        this.name = name;
    }

    public String getPath() {
        return Path;
    }

    public void setPath(String path) {
        Path = path;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isError() {
        return TextUtils.isEmpty(Path) || TextUtils.isEmpty(name);
    }

    public boolean equal(SharedFile file) {
        Gson gson = new Gson();
        return gson.toJson(this).equals(gson.toJson(file));
    }
}
